#include "stdafx.h"
#include "FileNameUtils.h"
#include "Utils.h"

const LPCTSTR cJPEGExtensions[] = { _T("jpg"), _T("jpeg"), _T("jpe"), _T("jfif") };
const size_t cJPEGExtensionsCount = 4;

const LPCTSTR cPNGExtensions[] = { _T("png") };
const size_t cPNGExtensionsCount = 1;

const LPCTSTR cGIFExtensions[] = { _T("gif") };
const size_t cGIFExtensionsCount = 1;

const LPCTSTR cBMPExtensions[] = { _T("bmp") };
const size_t cBMPExtensionsCount = 1;

const LPCTSTR  cWordExtensions[] = { _T("doc"), _T("docx"), _T("rtf") };
const size_t cWordExtensionsCount = 3;


void GetDefaultDocExt(tstring& Ext)
{
	Ext = cWordExtensions[0];
}

void GetDefaultJPEGExt(tstring& Ext)
{
	Ext = cJPEGExtensions[0];
}

void GetDefaultPNGExt(tstring& Ext)
{
	Ext = cPNGExtensions[0];
}

void GetDefaultGIFExt(tstring& Ext)
{
	Ext = cGIFExtensions[0];
}

void GetDefaultBMPExt(tstring& Ext)
{
	Ext = cBMPExtensions[0];
}

bool HasDocExt(const tstring& PathToFile)
{
	return CheckFileExtension(PathToFile, cWordExtensions, cWordExtensionsCount);
}

bool HasJPEGExt(const tstring& PathToFile)
{
	return CheckFileExtension(PathToFile, cJPEGExtensions, cJPEGExtensionsCount);
}

bool HasPNGExt(const tstring& PathToFile)
{
	return CheckFileExtension(PathToFile, cPNGExtensions, cPNGExtensionsCount);
}

bool HasGIFExt(const tstring& PathToFile)
{
	return CheckFileExtension(PathToFile, cGIFExtensions, cGIFExtensionsCount);
}

bool HasBMPExt(const tstring& PathToFile)
{
	return CheckFileExtension(PathToFile, cBMPExtensions, cBMPExtensionsCount);
}